home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: swampwiz@ix.netcom.com(Jean P. Laborde )
- Newsgroups: comp.lang.c++
- Subject: Re: A class with pointers to yet undeclared classes
- Date: 16 Apr 1996 00:56:19 GMT
- Organization: Netcom
- Message-ID: <4kur7j$c1e@dfw-ixnews6.ix.netcom.com>
- References: <4ksden$276@decaxp.HARVARD.EDU>
- NNTP-Posting-Host: nor-la1-08.ix.netcom.com
- X-NETCOM-Date: Mon Apr 15 7:56:19 PM CDT 1996
-
- In <4ksden$276@decaxp.HARVARD.EDU> mueller@course1.HARVARD.EDU (Mark
- Mueller) writes:
- >
- >How do I convince the compiler that class B is going to be declared
- later?
- >
- > Mark
- > mueller@fas.harvard.edu
- >
- >
-
- before B is called, have the line
-
- class B;
-
- ex:
-
- class A
- {
- B b;
- };
-
- class B
- {
- ~~
- };
-
- // compile error
-
- now try:
-
- class B;
-
- in front.
-